package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"news/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})

	beego.Router("/register", &controllers.UserController{}, "post:Register") //注册
	beego.Router("/login", &controllers.UserController{}, "post:Login")       //登入

	beego.Router("/create", &controllers.NewsController{}, "post:Create") //新闻添加
	beego.Router("/del", &controllers.NewsController{}, "post:Del")       //删除
	beego.Router("/list", &controllers.NewsController{}, "get:List")      //展示
}
